
<?php if(isset($isInsert) && $isInsert){
?>
<script>
	ajax('listContent','<?php echo 'resource_categories/lists/1'?>');
	closeBox('addContent');
</script>
<?php
}
else{
?>
<fieldset>
    <legend><?php _resource('Translate resource');?>&nbsp;<img class="Tips1" title="<?php echo $listLang[$locale]?>" border="0" src="<?php echo $this->webroot.'img/backend/flag/'.$locale.'.png'?>"></legend>
<center><div class="messageNone" id="addError" >&nbsp;</div><center>
<?php if($this->Session->read('message')){
	echo '<script>showMessage("addError","'.$this->Session->read('message').'");</script>';
	$this->Session->delete('message');	
	}?>
<?php if($this->Session->read('error')){
	echo '<script>showMessage("addError","'.$this->Session->read('error').'",1);</script>';
	$this->Session->delete('error');
}?>
    <form id="adminForm" name="adminForm" method="post" action="<?php echo $this->params['controller'].'/translate/'.$cid.'/'.$locale ?>">
	<table border="0" class="form" style="width:100%">
		<?php if(count($this->data)>0){
			foreach($this->data as $k=>$v){
		?>
       	<tr>          
       		<td class="label" align="right" width="50%"><?php echo $v[$uses[0]]['message'] ?></td>
       		<td align="left"><?php echo $this->Form->input($uses[0].'.'.$v[$uses[0]]['id'].'.translate',array('class'=>'input','label'=>'','size'=>60,'maxlength'=>255,'value'=>$v[$uses[0]]['translate']));?></td>           
        </tr>  
        <?php }}?>
            
	</table>
    <div style="width:130px">
          <div class="button"><a onclick="submitForm('adminForm','addContent');document.getElementById('top').focus();" href="javascript:;" title="<?php echo _resource('save') ?>"  > <span class="icon-32-save"> </span></a> </div>         
          <div class="button"><a onclick="resetForm('adminForm')" href="javascript:;" title="<?php echo _resource('reset') ?>"  > <span class="icon-32-back"> </span></a> </div>
          <div class="button"><a onclick="closeBox('addContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
    </div>
      </form>
</fieldset>
<?php }?>


